package com.cxq.thread;

import java.util.Date;
import java.util.concurrent.Callable;

/**
 * Created by cxq on 2020/7/25.
 */

//这里的泛型指的是实现方法返回值
public class MyCallable implements Callable<String>{
    @Override
    public String call() throws Exception {
        for(int i=0;i<10;i++){
            System.out.println(Thread.currentThread()+"执行了"+new Date());
        }
        return "myCallable执行完毕了";
    }
}
